package jee.boot.oauth.config.token;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.core.RedisTemplate;

/**
 * 存储token
 * 
 * @author zhilei.wang
 */
@Configuration
public class TokenStoreConfig {


	@Autowired(required = false)
	private RedisTemplate<String, Object> redisTemplate;



	@Bean
	public RedisTemplateTokenStore redisTokenStore() {
		RedisTemplateTokenStore redisTemplateStore = new RedisTemplateTokenStore();
		redisTemplateStore.setRedisTemplate(redisTemplate);
		return redisTemplateStore;

	}

}
